]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
overview: set side controls visibility on view page change
authorCosimo Cecchi <cosimoc@gnome.org>
Thu, 24 Jan 2013 21:34:06 +0000 (16:34 -0500)
committerCosimo Cecchi <cosimoc@gnome.org>
Thu, 14 Feb 2013 23:18:21 +0000 (18:18 -0500)
For now use the same behavior as before - hide the workspace thumbnails
when showing the applications page.

https://bugzilla.gnome.org/show_bug.cgi?id=682050

js/ui/overview.js

index 747343163226a3c2b09f802ed08fe1e8a86e1db2..adff625184d84542d62bf69a1b6c86e58ce5e897 100644 (file)
@@ -257,10 +257,32 @@ const Overview = new Lang.Class({
                                               y_fill: true });
         this._overview.add_actor(this._messageTrayGhost);
 
+        this._viewSelector.connect('page-changed', Lang.bind(this,
+            function() {
+                this._setSideControlsVisibility();
+            }));
+
         Main.layoutManager.connect('monitors-changed', Lang.bind(this, this._relayout));
         this._relayout();
     },
 
+    _setSideControlsVisibility: function() {
+        // Ignore the case when we're leaving the overview, since
+        // actors will be made visible again when entering the overview
+        // next time, and animating them while doing so is just
+        // unnecesary noise
+        if (!this.visible || this._hideInProgress)
+            return;
+
+        let activePage = this._viewSelector.getActivePage();
+        let thumbnailsVisible = (activePage == ViewSelector.ViewPage.WINDOWS);
+
+        if (thumbnailsVisible)
+            this._thumbnailsSlider.slideIn();
+        else
+            this._thumbnailsSlider.slideOut();
+    },
+
     addSearchProvider: function(provider) {
         this._viewSelector.addSearchProvider(provider);
     },